class LanguagesController < ApplicationController
  def index
    languages = Language.all
    json = {}
    languages.each do |language|
      json[language.id] = {
          name: language.name,
          dojo_text: language.dt,
          hall_text: language.ht,
          ignore_spaces: language.is
      }
    end

    respond_to do |format|
      format.json { render json: json }
    end
  end
end
